package com.pattern.decorator;

/**
 * @author 冯志立
 * @create 2019-10-30 10:44
 */
public class CoffeeBar {
    public static void main(String[] args) {
        //2份巧克力+1份牛奶的longBlack
        //先点一份单品咖啡
        Drink order = new LongBlack();
        System.out.println("费用：" + order.cost());
        System.out.println("描述：" + order.getDes());
        //加入牛奶
        order = new Milk(order);
        System.out.println("费用：" + order.cost());
        System.out.println("描述：" + order.getDes());
        //套娃方式，加入巧克力。。。。
    }
}
